package cn.aylog.pojo;

import java.util.Scanner;

public class Bank {
    private User[] users = new User[5];
    private int size = 0;
    private Scanner sc = new Scanner(System.in);


    /**
     * 账户初始化
     */
    public void initial() {
    }

    /**
     * 存钱
     * @param money
     * @return
     */
    public Boolean save(Double money) {
        System.out.println("save..." + money);
        return true;
    }

    public Boolean widthDraw() {
        System.out.println("widthDraw...");
        return true;
    }

    public Boolean trans() {
        System.out.println("trans...");
        return true;
    }

    public Boolean query() {
        System.out.println("query...");
        return true;
    }

    public Boolean modifyPassword() {
        System.out.println("modifyPassword...");
        return true;
    }


    public void showMenu() {
        System.out.print("请选择:");
        System.out.print("\t1.存款");
        System.out.print("\t2.取款");
        System.out.print("\t3.转账");
        System.out.print("\t4.查询余额");
        System.out.print("\t5.修改密码");
        System.out.println("\t0.退出");
        System.out.print("============> ");
    }

    public void doThing() {
        String in = sc.next();
        while(!"0".equals(in)) {
            switch (in) {
                case "1" :
                    break;
                case "2" :
                    break;
                case "3" :
                    break;
                case "4" :
                    break;
                case "5" :
                    break;
                case "6" :
                    break;
            }
            this.showMenu();
            in = sc.next();
        }
    }

    public static void main(String[] args) {
        Bank bank = new Bank();
        bank.initial();
        bank.showMenu();
        bank.doThing();
    }
}
